import request from "@/utils/request";

/**
 *  获取昨天、今天销售额与销量、优惠金额
 * @param params
 * @returns
 */
export function getSaleData(data) {
  return request({
    url: '/management/index/getSaleData',
    method: 'post',
    data
  })
}

/**
 *  获取设备数据
 * @param params
 * @returns
 */
export function getMachineData(data) {
  return request({
    url: '/management/index/getMachineData',
    method: 'post',
    data
  })
}

/**
 *  获取货道统计数据
 * @param params
 * @returns
 */
export function getChannelData(data) {
  return request({
    url: '/management/index/getChannelData',
    method: 'post',
    data
  })
}

/**
 *  获取空槽货道列表
 * @param params
 * @returns
 */
export function getEmptyChannel(data) {
  return request({
    url: '/management/index/getEmptyChannel',
    method: 'post',
    data
  })
}

/**
 *  获取Bad货道列表
 * @param params
 * @returns
 */
export function getBadList(data) {
  return request({
    url: '/management/index/getBadChannel',
    method: 'post',
    data
  })
}

/**
 *  获取空货货道列表
 * @param params
 * @returns
 */
export function getStockOutList(data) {
  return request({
    url: '/management/index/getStockOutChannel',
    method: 'post',
    data
  })
}

/**
 *  获取销售折线图数据
 * @param params
 * @returns
 */
export function getSaleChart(data) {
  return request({
    url: '/management/index/getSaleChart',
    method: 'post',
    data
  })
}

/**
 *  获取设备前10排行榜
 * @param params
 * @returns
 */
export function getMachine10List(data) {
  return request({
    url: '/management/index/getMachine10List',
    method: 'post',
    data
  })
}

/**
 *  商品前10排行榜
 * @param params
 * @returns
 */
export function getGoods10List(data) {
  return request({
    url: '/management/index/getGoods10List',
    method: 'post',
    data
  })
}
/**
 * 获取礼品赠送
 * @param params
 * @returns
 */
export function getGift(data) {
  return request({
    url: '/management/index/getGift',
    method: 'post',
    data
  })
}
/**
 *  导出设备排行榜
 * @param params
 * @returns
 */
export function exportMachineList(data) {
  return request({
    url: '/management/index/exportMachineList',
    method: 'post',
    data
  })
}
/**
 *  导出商品排行榜
 * @param params
 * @returns
 */
export function exportGoodsList(data) {
  return request({
    url: '/management/index/exportGoodsList',
    method: 'post',
    data
  })
}